This invention relates to a ranging apparatus installed in a camera and using an auto-focusing (AF) technique for focusing the camera on a subject.
In general, an image signal used for ranging is obtained by integrating a photoelectric current emitted from a line sensor. However, in order to make the resultant integration value fall within a dynamic range limited by the circuit scale of the camera, it is necessary to carefully change the integration finish time while monitoring the integration value.
For example, Japanese Patent Application KOKAI Publication No. 54-051556 discloses a technique for finishing the integration when the integration value has reached a predetermined value. Further, Japanese Patent Application KOKAI Publication No. 7-98428 filed by the same applicant as this application discloses a technique for estimating and determining the integration finish time on the basis of changes over time in integration value.
Moreover, Japanese Patent Application KOKAI Publication No. 62-148910 discloses a technique for performing ranging calculation not by determining the integration timing but by selecting signals obtained from a plurality of ranging areas that are defined by dividing an image area to-be-shot (composition).
When in the technique described in Japanese Patent Application KOKAI Publication No. 54-051556, the to-be-shot image in which a to-be-photographed subject exists is dark, the finish time of integration for ranging cannot be estimated and lots of time is required for integration, with the result that the moment for a good picture may be missed.
Contrary to Japanese Patent Application KOKAI Publication No. 54-051556, in Japanese Patent Application KOKAI Publication No. 7-98428, lots of time is required for, for example, estimation, and the integration amount may exceed the dynamic range of the circuit before the termination of the control, when the to-be-shot image in which a to-be-photographed subject exists is bright, i.e. the to-be-shot image has a high luminance, or when the integration processing must be quickly stopped as in a case where strong assisting light is emitted.
Referring to the characteristic and timing charts of FIG. 10 and the flowchart of FIG. 11, problems which may occur in the integration control will be described.
As is shown in FIG. 11, after starting the integration (step S31), monitoring is repeated until the integration value reaches an appropriate level (step S32). It is then determined in a step S33 whether or not the integration value has reached the appropriate level (step S33). When the appropriate level has been reached and it is determined that the integration should be finished, it is finished (step S34).
In the above-described integration system, the time (TH) necessary from the termination of the time (tM) during which monitoring is performed using A/D conversion, to the determination at the step S33 is indicated by charts as shown in FIG. 10.
Specifically, where the to-be-shot image has a high luminance at which the appropriate level is exceeded in a time earlier than (tM+TH), or where strong assisting light is emitted, the integration value cannot be made to be lower than the appropriate level, and inevitably exceeds the level. Further, when the to-be-shot image has a medium luminance, the integration value can be controlled appropriately, whereas when it has a low luminance, the shutter time lag required until the appropriate level is reached becomes longer and hence the moment for a good picture will be missed.
A ranging operation for improving the above problem will be described with reference to the flowchart of FIG. 13 and the timing chart of FIG. 12.
In this ranging operation, pre-integration processing is executed twice before the chief integration processing to estimate the time required for the chief integration processing.
First, pre-integration without light projection is started (step S41). After that, time counting is started (step S42), thereby performing integration till a time point t1 as shown in FIG. 12A (step S43) and taking the integration amount (A/D1) at the time point t1 (step S44).
Subsequently, the integration processing is continued (step S45), and the integration amount (A/D2) is taken at a time point t2 (step S46).
The integration amounts (A/D2) and (A/D1) are compared with each other, thereby determining whether or not A/D2 is large enough to reach a saturation level (step S47).
If the comparison result falls within a predetermined range (if the answer to the question at the step S47 is No), the time t.sub.INT required for the chief integration is determined from the amount of change (A/D2-A/D1) and the time difference .DELTA.t between the time points t1 and t2 (step S48).
Supposing that an appropriate integration level is Vs, the time required for the chief integration is given by the following equation (1), using the relationship t.sub.INT : Vs=.DELTA.t: (A/D2-A/D1). EQU t.sub.INT =.DELTA.t.multidot.VS/(A/D2-A/D1) (1)
The lower the luminance, the longer the integration time T.sub.INT. In light of this, it is determined whether or not the integration time t.sub.INT is longer than a predetermined time that adversely affects photography (step S49). If the integration time t.sub.INT exceeds the predetermined time (if the answer to the question at the step S49 is Yes), it is replaced with a predetermined integration time T.sub.INT1 (step S50).
The amount of integration stored during the pre-integration is reset (step S51), and the chief integration for ranging is started (step S52).
It is determined whether or not the set integration time t.sub.INT (or T.sub.INT1) is reached (step S53). If the integration time is reached (if the answer is Yes), the chief integration is stopped (step S54), and the program proceeds to a routine for ranging that uses the obtained integration time.
If, on the other hand, the integration amount (A/D2) is too large (if the answer to the question at the step S47 is Yes) since the to-be-shot image has a high luminance as shown in FIG. 12B, the integration termination time t1 is changed to a shorter one, for example, t1/2 (step S55), thereby preventing saturation of the integration amount.
Accordingly, in the above-described ranging method, whether or not the time required for the chief integration is long can be estimated during the pre-ranging, with the result that the method is free from missing moments for good pictures, or from the out-of-focus state of a too bright subject.
Moreover, the time point t1 or t2 is not obtained using a monitor or a program, but is determined by a hardware timer. Thus, the time points are predetermined with high accuracy, which enables high-speed control.
However, when the to-be-shot image has a low luminance such as a night view image, the above ranging method forcibly shortens the integration time, which causes a similar effect to that obtained when the integration processing is stopped halfway. As a result, a case where the integration value does not reach the appropriate level may occur, thereby degrading the ranging accuracy.
In addition, a so-called multi AF system is also available, which has a plurality of ranging areas that enable focusing of the camera on a main subject for photography irrespective of the position of the subject in the viewer.
In this multi AF system, a technique for correctly determining the main subject and selecting the one of the ranging areas of the viewer, for which ranging should be performed, is important as well as a technique for controlling the amount of integration. This is because accurate focusing of the camera on the subject cannot be achieved if ranging is performed for a ranging area that does not correspond to the subject.
In a passive AF system as disclosed in Japanese Patent Application KOKAI Publication No. 62-148910, priority is imparted to contrast and accurate ranging is not performed for a subject of a low contrast. When, for example, a to-be-shot image as shown in FIG. 6A is photographed, the person as the main subject is out of focus since the background of the person has a higher contrast than the person.